#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require File.dirname(__FILE__) + "/../config/environment.rb"

puts "Creating root user"
u = User.create(:nickname => "root", :user_name => "Charlie Root", :password => "password", :email => "root@chatlino.com", :agree_term => 'y')

puts "Creating the root chatroom"
c = Chatroom.create(:title => "Root's Chatroom", :description => "There are something about root to say", :user_id => u.id )

1.upto(10) do |i|
    u = User.create(:nickname => "chatter #{i}", :user_name => "Chatter #{i}", :password => "password", :email => "guest#{i}@chatlino.com", :agree_term => 'y')
end

